package service

import (
	"context"
	"mall-portalv2/internal/model"
)

func (s *Service) QueryUmsMemberWhereID(ctx context.Context, id int64) (model.UmsMember, error) {
	result, err := s.dao.QueryUmsMemberWhereID(ctx, id)
	if err != nil {
		return model.UmsMember{}, err
	}
	return result, err
}

func (s *Service) CreateUmsMember(ctx context.Context, insertModel model.UmsMember) (model.UmsMember, error) {
	result, err := s.dao.CreateUmsMember(ctx, insertModel)
	if err != nil {
		return model.UmsMember{}, err
	}
	return result, err
}

func (s *Service) UpdateUmsMember(ctx context.Context, ID int64, upadtes map[string]interface{}) error {
	if err := s.dao.UpdateUmsMember(ctx, ID, upadtes); err != nil {
		return err
	}
	return nil
}
